package com.zr.spring.aware;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Solution {
    public static void main(String[] args) {
        String beanXml = "classpath:aware/aware-bean.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(beanXml);

        System.out.println(context.getBean(ServiceA.class));
        System.out.println(context.getBean(ServiceA.class));

        System.out.println("serviceB中的serviceA");
        ServiceB serviceB = context.getBean(ServiceB.class);

        serviceB.say();
        serviceB.say();

    }
}
